word=[]
words={}
with open('mary.txt') as ma:
    for line in ma:
        line_list=list(line.lower().split())
        for word_ in line_list:
            if ',' in word_:
                word_=word_.strip(',')
            if '.' in word_:
                word_=word_.strip('.')
            if word_ not in word:
                word.append(word_)
                words[word_]=1
            elif word_ in word:
                words[word_]=words[word_]+1
    list1=list(words.keys())
    list1.sort()
    for name in list1:
        print(name+': '+str(words[name]))
    
            
